﻿{extends file="x/layout/layout.tpl"}

{block name=otherLibraries}
<link type="text/css" rel="stylesheet" href="/x/css/media/index.css"/>
<script type="text/javascript" src="/x/javascripts/jquery/jquery.qtip.min.js"></script>
<script type="text/javascript" src="/x/uploadify/swfobject.js"></script>
<script type="text/javascript" src="/x/uploadify/jquery.uploadify.js"></script>
<script type="text/javascript" src="/x/javascripts/media/index.js"></script>
<script type="text/javascript" src="/x/yoxview/yoxview-init.js"></script>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
<script type="text/javascript" src="/x/javascripts/jquery/jquery.block-ui-2.31.js"></script>
{/block}

{block name=mainMenu}
{include file="x/menu/media.tpl"}
{/block}

{block name=tabContent}
<div style="padding: 0 0 5px 0;" id="albumTopWrapper">
	<span id="listAlbumTypeSelectWrapper" style="display: none">
	Loại album:
	<select id="listAlbumType" style="min-width: 100px;">
		<option id="photoOption" value="photo">Hình ảnh</option>
		<option id="videoOption" value="video">Video</option>
	</select>
	</span>
	<!-- New album button will be appended here-->
	
</div>
<div class="table_border" id="listAlbumTableWrapper" style="display: none">
	<table id="listAlbumTable" cellpadding="0" cellspacing="0" width="100%">
		<thead>
			<tr>
				<th style="width: 4em;">ID</th>
				<th>Ảnh đại diện</th>
				<th style="width: 20em;">Tên album</th>
				<th style="width: 20em;">Ghi chú</th>
				<th style="width: 10em;">Ngày tạo</th>
				<th style="width: 7em;">Chức năng</th>			
				<th style="width: 7em;">Quản lý</th>
			</tr>
		</thead>
		<tbody>
		</tbody>
	</table>
</div>
<div id="albumSelectPrivReport" style="display: none">Bạn không có quyền liệt kê album</div>
{/block}

{block name=otherTabContentDiv}
<div id="mediaTabContent">
	<div style="padding: 0 0 5px 0;" id="mediaTopWrapper">
		<div style="padding: 0.5em 0 0.5em 0">Tên album: <span id="albumNameSpan" style="font-weight: bold"></span></div>
		<div id="mediaTopButtonWrapper">
			<!-- New Media button will be preprended here -->							
			
			<span><input id="backButton" type="button" value="Trở lại"/></span>
		</div>
	</div>

	<div class="table_border" id="listMediaTableWrapper">
		<table id="listMediaTable" cellpadding="0" cellspacing="0" width="100%">
			<thead>
				<tr>
					<th style="width: 4em;">ID</th>
					<th><span id="mediaSpan"></span></th>
					<th style="width: 20em;">Ghi chú</th>
					<th style="width: 10em;">Ngày upload</th>					
					<th style="width: 7em;">Chức năng</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
	</div>
	<div id="mediaSelectPrivReport" style="display: none">Bạn không có quyền liệt kê ảnh hoặc album</div>
</div>
{/block}

{block name=belowOtherComponents}
<div id="newAlbumDialog" title="Thêm album">
	<form id="newAlbumForm" method="post">
		<table width="100%">
			<tr id="newAlbumErrorRow">
				<td>&nbsp;</td>
				<td id="newAlbumErrorMessage" class="error"></td>
			</tr>
			<tr>
				<td align="right" style="width: 9em;">Loại <span class="required">*</span></td>
				<td style="width: 10em;">
				<select id="newAlbumType" name="newAlbumType" style="min-width: 100px;">
					<option id="photoOption" value="photo">Ảnh</option>
					<option id="videoOption" value="video">Video</option>
				</select>				
				</td>
			</tr>
			<tr>
				<td align="right">Tên album <span class="required">*</span></td>
				<td><input type="text" id="newAlbumName" name="newAlbumName"/></td>
			</tr>
			<tr id="newAlbumUploadTr">
			  <td align="right">Ảnh đại diện <span class="required">*</span></td>
			  <td><input type="file" id="newAlbumUpload" name="newAlbumUpload"/><input type="hidden" id="newAlbumFilename" name="newAlbumFilename" /></td>
			</tr>
			<tr>
				<td align="right">Ghi chú </td>
				<td><textarea type="file" id="newAlbumDescription" name="newAlbumDescription"></textarea></td>
			</tr>
		</table>
	</form>
</div>
<div id="editAlbumDialog" title="Sửa album">
	<form id="editAlbumForm" method="post">
		<table width="100%">
			<tr id="editAlbumErrorRow">
				<td>&nbsp;</td>
				<td id="editAlbumErrorMessage" class="error"></td>
			</tr>
			<tr>
				<td align="right">Tên album <span class="required">*</span></td>
				<td><input type="text" id="editAlbumName" name="editAlbumName"/></td>
			</tr>
			<tr id="editAlbumUploadTr">
			  <td align="right">Ảnh đại diện </td>
			  <td><input type="file" id="editAlbumUpload" name="editAlbumUpload"/><input type="hidden" id="editAlbumFilename" name="editAlbumFilename" /></td>
			</tr>
			<tr>
				<td align="right">Ghi chú </td>
				<td>
					<textarea type="file" id="editAlbumDescription" name="editAlbumDescription"></textarea>
					<input type="hidden" id="editAlbumID" name="editAlbumID" />					
				</td>
			</tr>
		</table>
	</form>
</div>
<div id="removeAlbumDialog" title="Xóa album">
	<form id="removeAlbumForm" method="post">
    <div><img src="/images/icon/delete_32.png" align="left" /> Bạn có chắc chắn xóa album có ID: <span id="removeShowAlbumID" style="font-weight: bold;"></span>?</div>
    <input type="hidden" id="removeAlbumID" name="removeAlbumID" />
  </form>
</div>


{if isset($swapLayout)}
<div id="newMediaDialog" title="Thêm mới">
	<form id="newMediaForm" method="post">
		<table width="100%">
			<tr id="newMediaErrorRow">
				<td>&nbsp;</td>
				<td id="newMediaErrorMessage" class="error"></td>
			</tr>
			<tr id="newMediaUploadTr">
			  <td align="right">Chọn file <span class="required">*</span></td>
			  <td>
			  <div id="newPhotoUploadWrapper"><input type="file" id="newPhotoUpload"/><input type="hidden" id="newPhotoFilename" name="newPhotoFilename" /></div>
			  <div id="newVideoUploadWrapper" style="display:none"><input type="file" id="newVideoUpload"/><input type="hidden" id="newVideoFilename" name="newVideoFilename" /></div>
			  </td>
			</tr>
			<tr>
				<td align="right">Ghi chú </td>
				<td><textarea type="file" id="newMediaDescription" name="newMediaDescription"></textarea></td>
			</tr>
		</table>
	</form>
</div>
<div id="editMediaDialog" title="Sửa album">
	<form id="editMediaForm" method="post">
		<table width="100%">
			<tr id="editMediaErrorRow">
				<td>&nbsp;</td>
				<td id="editMediaErrorMessage" class="error"></td>
			</tr>
			<tr>
				<td align="right">Ghi chú </td>
				<td>
					<textarea type="file" id="editMediaDescription" name="editMediaDescription"></textarea>
					<input type="hidden" id="editMediaID" name="editMediaID" />
				</td>
			</tr>
		</table>
	</form>
</div>
<div id="removeMediaDialog" title="Xóa album">
	<form id="removeMediaForm" method="post">
    <div><img src="/images/icon/delete_32.png" align="left" /> Bạn có chắc chắn xóa album có ID: <span id="removeShowMediaID" style="font-weight: bold;"></span>?</div>
    <input type="hidden" id="removeMediaID" name="removeMediaID" />
  </form>
</div>
{/if}

{/block}

